package com.jxmcloud.business.cut.service.user;

import com.jxmcloud.business.cut.dto.admin.AdminUserMergerDto;
import com.jxmcloud.business.cut.dto.client.LoginNameDto;
import com.jxmcloud.business.cut.vo.user.PlayerInfoVo;

public interface IUserManagerService {
    PlayerInfoVo getUserInfo(String session);       // 根据session获取用户句柄
    PlayerInfoVo makeNewPlayer(String account);     // 创建新玩家
    PlayerInfoVo loadPlayerFromDb(Integer uid);     // 从数据库拉取信息
    Integer getUidByAccount(String account);        // 根据账号获取UID
    void refreshPlayerCache(PlayerInfoVo player);    // 用户数据更新

    boolean checkPlayerLock(Integer uid);           // 检测锁
    void removePlayerLock(Integer uid);             // 移除锁




    /**
     * 通过uid获取player
     * @param uid
     * @return
     */
    PlayerInfoVo getUserInfoByUid(Integer uid);

    /**
     * 检测账号状态是否正常
     * @param account
     * @return
     */
    LoginNameDto checkByAccount(String account);

    /**
     * 通过account获取player
     * @param account
     * @return
     */
    PlayerInfoVo getUserInfoByAccount(String account);

    /**
     * 用户状态是否正常
     * @param player
     * @return
     */
    boolean isUserStatusNormal(PlayerInfoVo player);

    /**
     * 更新用户信息
     * @param dto
     */
    void updateUserStatus(AdminUserMergerDto dto);

}
